#ifndef TCPSERVER_HPP_
#define TCPSERVER_HPP_


#include <cstring>
#include <iostream>
#include <vector>
#include <cstdint>
#include <cstdio>

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <netinet/tcp.h>


#include <Connectivity/TCPConnection.hpp>


class TCPServer{

private:

	int port;
	int connected;
	bool ipv6;


	int sockListen;



public:

	TCPServer(int port, bool ipv6);

	int init();

	TCPConnection *waitForConnection();

	void closeServer();

	int getSock();

};



#endif /* TCPSERVER_HPP_ */
